﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
using System.Configuration;

namespace BHair
{
    public partial class frmghyh : Form
    {
        public frmghyh()
        {
            InitializeComponent();
        }
        string constr = ConfigurationManager.ConnectionStrings["BHair.Properties.Settings.BHairDBConnectionString"].ConnectionString;
        private void button1_Click(object sender, EventArgs e)
        {
           /* string user = this.txtuser.Text;
            string pwd = this.txtpwd.Text;
            SqlConnection conn = new SqlConnection(constr);
            conn.Open();
            string sql =string.Format( "SELECT [LoginUserID],[LoginPassword],[username]FROM [BHairDB].[dbo].[LoginUser] where LoginUserID='{0}' and LoginPassword='{1}'",user,pwd);
            SqlDataAdapter sda = new SqlDataAdapter(sql,conn);
            DataTable dt = new DataTable();
            sda.Fill(dt);
            if (dt.Rows.Count > 0)
            {
               // MessageBox.Show("登陆成功");
                chuanzhi.userID = user;
                this.Close();
            }
            else 
            {
                MessageBox.Show("用户名或密码错误，登陆失败");
            }
            */
        }

        private void button2_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void frmghyh_Load(object sender, EventArgs e)
        {

        }
    }
}
